package com.buka.blog.entity;

import java.time.LocalDateTime;
import java.util.Date;

public class Blog {

    private Long id;

    //博文需要跟用户关联起来，方便查询用户发布的博文
    private Long userId;

    private String title;//博客标题

    private String author;//作者

    private String content;//内容

    private LocalDateTime createTime;

    private int status;//状态  0 编辑模式  1 已发布

    //默认是0  标记为1 表示删除
    private int deleteFlag;//实际开发中，删除不是使用物理删除。使用的是逻辑删除  执行update 语句，将deleteFlag字段设置为1

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(int deleteFlag) {
        this.deleteFlag = deleteFlag;
    }
}
